import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import ChatWindow from "@/views/ChatWindow";
import ChatWindow2 from "@/views/ChatWindow2";
import ChatWindow3 from "@/views/ChatWindow3";
import Login from "@/views/Login";
import First from "@/views/First";
import UserList from "@/components/UserList";
import RoleManagement from "@/components/RoleManagement";
import PermissionManagement from "@/components/PermissionManagement";
import ChatWindow4 from "@/views/ChatWindow4";
import ChatBot from "@/views/ChatBot";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'chatBot',
    component: ChatBot
  },
  {
    path: '/first',
    name: 'first',
    component: First,
    children: [
      {
        path: '/user/list',
        component: UserList
      },
      {
        path: '/user/role',
        component: RoleManagement
      },
      // {
      //   path: '/two',
      //   component: ChatWindow3
      // },
      {
        path: '/user/permission',
        component: PermissionManagement
      },
      // {
      //   path: '/user',
      //   children:[
      //     // {
      //     //   path: '/list',
      //     //   name: 'UserList',
      //     //   component: ChatWindow3
      //     // },
      //     // {
      //     //   path: '/role',
      //     //   name: 'UserRole',
      //     //   component: ChatWindow2
      //     // }
      //   ]
      // }
      // {
      //   path: '/uer/list',
      //   component: ChatWindow3
      // }
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/two',
    name: 'chaTwo',
    component:  ChatWindow3
  },
  // {
  //   path:'/san',
  //   name:'chat3',
  //   component: ChatWindow3
  // },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path:'/four',
    name:'chatFour',
    component: ChatWindow4
  },
  {
    path:'/five',
    name:'chatFive',
    component: ChatWindow2
  },
  {
    path:'/six',
    name:'chatBot',
    component: ChatBot
  }
]
const router = new VueRouter({
  routes
})

export default router
